/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.crm.action.sale.contacts;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.crm.mapper.sale.contacts.ContactsBusinessOpportMapper;
public class ContactsBusinessOpport extends BaseAction
{
    @Autowired(required=false)
	private ContactsBusinessOpportMapper mapper;
    /**
    潜在客户联系人商机管理
    */
    
    public Map contactsBusinessOpport() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_predict=mapper.s_predict(params);
        result.put("s_predict", s_predict);
        
        return result;
    }
    /**
    增加商机
    */
    
    public Map contactsBusinessOpportAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> person1=mapper.person1(params);
        result.put("person1", person1);
        
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        
        SQLList<SQLMap> client=mapper.client(params);
        SQLMap client_emt=client.getExistfirst();
        result.put("client", client_emt);
        
        return result;
    }
    /**
    联系人商机明细
    */
    
    public Map contactsBusinessOpportDet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_predict=mapper.s_predict(params);
        SQLMap s_predict_emt=s_predict.getExistfirst();
        result.put("s_predict", s_predict_emt);
        
        
        SQLList<SQLMap> s_part=mapper.s_part(params);
        result.put("s_part", s_part);
        
        return result;
    }
    /**
    添加组件
    */
    
    public Map contactsBusinessOpportAssembly() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        return result;
    }
    /**
    组件明细
    */
    
    public Map contactsBusinessOpportAssemblyDet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> part=mapper.part(params);
        SQLMap part_emt=part.getExistfirst();
        result.put("part", part_emt);
        
        return result;
    }
    /**
    修改组件
    */
    
    public Map contactsBusinessOpportAssemblyUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        
        SQLList<SQLMap> part=mapper.part(params);
        SQLMap part_emt=part.getExistfirst();
        result.put("part", part_emt);
        
        return result;
    }
    /**
    增加商机修改
    */
    
    public Map contactsBusinessOpportAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID3 = mapper.CMID3(params);
        result.put("CMID3", CMID3);
        
        
        int CMID4 = mapper.CMID4(params);
        result.put("CMID4", CMID4);
        
        return result;
    }
    /**
    添加组件修改
    */
    
    public Map contactsBusinessOpportAssemblySubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID4 = mapper.CMID4(params);
        result.put("CMID4", CMID4);
        
        return result;
    }
    /**
    修改组件修改
    */
    
    public Map contactsBusinessOpportAssemblyUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.contactsBusinessOpportAssemblyUpSubmit(params);
        
        return result;
    }
}